

var viewUser = function(e)
{
	//var newUrl = '/NKApp/Manage/user/view/useLayout/false/user_id/' + this.store.getValue(this.getItem(e.rowIndex), 'user_id');
	var newUrl = '/NKApp/Manage/user/view/user_id/' + this.store.getValue(this.getItem(e.rowIndex), 'user_id');
	newModalDialog({title: 'User Detail', style: 'width:770px;', href: newUrl});
};


var BushidoUserGrid = function(gridId, gridUrl)
{
	var gridStructure =
		[
			{field: 'user_id', name: 'Employee #', width: '80px'},
			{field: 'first_name', name: 'First Name', width: 'auto'},
			{field: 'last_name', name: 'Last Name', width: 'auto'}
		];
	
	var config =
	{
		id: gridId,
		url: gridUrl,
		structure: gridStructure,
		onRowClick: viewUser,
		query: {user_id: '*'}
	};
	
	return BushidoGrid(config);
};